name=input()
money=float(input())
time=float(input())
if time>50:
    money1=(time-50)*money*1.6+money*50
else:
    money1=time*money
print(f"{name},{time:.1f},{money1:.1f}")

